package com.wn.pettyloan.service.impl;

import com.wn.pettyloan.entity.UserQuestion;
import com.wn.pettyloan.mapper.UserQuestionMapper;
import com.wn.pettyloan.service.QuestionService;
import com.wn.pettyloan.vo.QandAVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: pettyloan
 * @ClassName QuestionServiceImpl
 * @description:
 * @author: 韩旭
 * @create: 2022-12-14 10:42
 **/
@Service
public class QuestionServiceImpl implements QuestionService {

    @Resource
    private UserQuestionMapper questionMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return questionMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(UserQuestion record) {
        return questionMapper.insert(record);
    }

    @Override
    public int insertSelective(UserQuestion record) {
        return questionMapper.insertSelective(record);
    }

    @Override
    public UserQuestion selectByPrimaryKey(Long id) {
        return questionMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(UserQuestion record) {
        return questionMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserQuestion record) {
        return questionMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<QandAVo> selectQuesAndAnswer() {
        return questionMapper.selectQuesAndAnswer();
    }
}